// router/index.js
import { createRouter, createWebHistory } from 'vue-router'


const routes = [
  {
    path: '/',
    name: 'login',
    component: () => import("@/views/hqy/login/LoginView.vue"),
  },
  {
    path: "/layout",
    name: "layout",
    component: () => import("@/views/LayoutView.vue"),
    redirect: { name: "Home" },
    children: [
      {
        path: "Home",
        name: "Home",
        component: () => import("@/views/hqy/shouye/shouye.vue"),
        meta: {
          title: "首页",
          iconName: 'House',
          index: "0"
        }
      },
      {
        path: "Notice",
        name: "Notice",
        component: () => import("@/views/hqy/notice/Notice.vue"),
        meta: {
          title: "公告",
          iconName: 'Bell',
          index: "1"
        }
      },
      {
        path: "FM",
        name: "FM",
        component: () => import("@/views/FM/FM.vue"),
        meta: {
          title: "FM管理",
          iconName: 'Flag',
          index: "2"
        }
      },
      {
        path: "KC",
        name: "KC",
        component: () => import("@/views/KC/kc.vue"),
        meta: {
          title: "课程管理",
          iconName: "Cloudy",
          index: "3"
        }
      },
      {
        path: "PublicWelfare",
        name: "PublicWelfare",
        component: () => import("@/views/PublicWelfare/PublicWelfare.vue"),
        meta: {
          title: "公益中心",
          iconName: "Ship",
          index: "4"
        }
      },
      {
        path: 'user',
        name: 'user',
        component: () => import("@/views/hqy/users/User_Info.vue"),
        meta: {
          title: '个人信息',
          iconName: 'UserFilled',
          index: "5"
        }
      },
        {
        path:"PublicWelfare",
        name:"PublicWelfare",
        component:()=>import("@/views/PublicWelfare/PublicWelfare.vue"),
        // 路由对象的属性，用来定义该路由的一些常量信息，从而更好的描述该路由
        meta:{
          title:"公益中心",
          iconName:"HelpFilled",
          index:"6"
        }
      },
      {
        path:"ZhiShi",
        name:"ZhiShi",
        component:()=>import("@/views/zhishi/ZhiShi.vue"),
        // 路由对象的属性，用来定义该路由的一些常量信息，从而更好的描述该路由
        meta:{
          title:"知识",
          iconName:"OfficeBuilding",
          index:"9"
        }
      },
      {
        path:"ConsultationRecordAndReviewService",
        name:"ConsultationRecordAndReviewService",
        component:()=>import("@/views/ConsultationRecordAndReviewService/ConsultationRecordAndReviewService.vue"),
        // 路由对象的属性，用来定义该路由的一些常量信息，从而更好的描述该路由
        meta:{
          title:"就诊管理",
          iconName:"IceTea",
          index:"10"
        }
      },
      {
        path: "userManager",
        name: "userManager",
        redirect: { name: "user" },
        meta: {
          title: "用户管理",
          iconName: 'User',
          index: "12"
        },
        children: [
          {
            path: "user11",
            name: "user11",
            component: () => import("@/views/hqy/users/Users.vue"),
            meta: {
              title: "普通用户管理",
              iconName: 'UserFilled',
              index: "12-0"
            }
          },
          {
            path: "consultant",
            name: "consultant",
            component: () => import("@/views/hqy/consultant/ConsultantInfo.vue"),
            meta: {
              title: "咨询师管理",
              iconName: 'UserFilled',
              index: "12-1"
            }
          },
        ]
      },
      {
        path:"Article",
        name:"Article",
        component:()=>import("@/views/Article/Article.vue"),
        // 路由对象的属性，用来定义该路由的一些常量信息，从而更好的描述该路由
        meta:{
          title:"精选文章",
          iconName:"Tickets",
          index:"13"
        }
      },
      {
        path:"dayi",
        name:"dayi",
        component:()=>import("@/views/dayi/dayi.vue"),
        // 路由对象的属性，用来定义该路由的一些常量信息，从而更好的描述该路由
        meta:{
          title:"答疑",
          iconName:"Message",
          index:"14"
        }
      },
      {
        path: "szgl",
        name: "szgl",
        redirect: { name: "szgl" },
        meta: {
          title: "师资管理",
          iconName: 'UserFilled',
          index: "15"
        },
        children: [
          {
            path: "zxs1",
            name: "zxs1",
            component: () => import("@/views/WT/Consultant.vue"),
            meta: {
              title: "咨询师信息管理",
              iconName: 'UserFilled',
              index: "15-0"
            }
          },
          {
            path: "consultantlevelView",
            name: "consultantlevelView",
            component: () => import("../views/WT/ConsultLevelView.vue"),
            meta: {
              title: "咨询师等级管理",
              iconName: 'UserFilled',
              index: "15-1"
            }
          },
          {
            path: "expertise",
            name: "expertise",
            component: () => import("@/views/WT/ExpertiseManager.vue"),
            meta: {
              title: "擅长领域管理管理",
              iconName: 'UserFilled',
              index: "15-2"
            }
          },
          {
            path: "consultationBooking",
            name: "consultationBooking",
            component: () => import("@/views/WT/consultationBooking.vue"),
            meta: {
              title: "咨询预约管理",
              iconName: 'UserFilled',
              index: "15-3"
            }
          },
        ]
      }


    ]
  },
  {
    path: "/layout1",
    name: "layout1",
    component: () => import("@/views/Layout.vue"),
    redirect: { name: "Home1" },
    children: [
      {
        path: "Home1",
        name: "Home1",
        component: () => import("@/views/hqy/shouye/shouye.vue"),
        meta: {
          title: "首页",
          iconName: 'House',
          index: "0"
        }
      },
      {
        path: "Notice1",
        name: "Notice1",
        component: () => import("@/views/hqy/notice/Notice.vue"),
        meta: {
          title: "公告",
          iconName: 'Bell',
          index: "1"
        }
      },
      {
        path: "FM1",
        name: "FM1",
        component: () => import("@/views/FM/C/FM.vue"),
        meta: {
          title: "FM管理",
          iconName: 'Flag',
          index: "2"
        }
      },
      {
        path: "KC1",
        name: "KC1",
        component: () => import("@/views/KC/kcc.vue"),
        meta: {
          title: "课程管理",
          iconName: "Cloudy",
          index: "3"
        }
      },
      {
        path: "PublicWelfare1",
        name: "PublicWelfare1",
        component: () => import("@/views/PublicWelfare/C/PublicWelfare.vue"),
        meta: {
          title: "公益中心",
          iconName: "Ship",
          index: "4"
        }
      },
      {
        path: 'user2',
        name: 'user2',
        component: () => import("@/views/hqy/users/User_Info1.vue"),
        meta: {
          title: '个人信息',
          iconName: 'UserFilled',
          index: "5"
        }
      },
      {
        path:"ZhiShi1",
        name:"ZhiShi1",
        component:()=>import("@/views/zhishi/ZhiShi.vue"),
        // 路由对象的属性，用来定义该路由的一些常量信息，从而更好的描述该路由
        meta:{
          title:"知识",
          iconName:"OfficeBuilding",
          index:"9"
        }
      },
      {
        path:"ConsultationRecordAndReviewService1",
        name:"ConsultationRecordAndReviewService1",
        component:()=>import("@/views/ConsultationRecordAndReviewService/C/ConsultationRecordAndReviewService.vue"),
        // 路由对象的属性，用来定义该路由的一些常量信息，从而更好的描述该路由
        meta:{
          title:"就诊管理",
          iconName:"IceTea",
          index:"10"
        }
      },
      {
        path:"Article1",
        name:"Article1",
        component:()=>import("@/views/Article/Article.vue"),
        // 路由对象的属性，用来定义该路由的一些常量信息，从而更好的描述该路由
        meta:{
          title:"精选文章",
          iconName:"Tickets",
          index:"11"
        }
      },
      {
        path:"dayi1",
        name:"dayi1",
        component:()=>import("@/views/dayi/dayi.vue"),
        // 路由对象的属性，用来定义该路由的一些常量信息，从而更好的描述该路由
        meta:{
          title:"答疑",
          iconName:"Message",
          index:"12"
        }
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router

